
include ../config.mak

_ASM_FLAGS=-I.. $(ASM_FLAGS)
INCLUDE=-I..

x86_64_OBJECTS=x86_64/vector_sse2.o
OBJECTS=vector_sse2.o

x86-64: $(x86_64_OBJECTS)
	ld -shared -soname libmatvec_asm.so $(OBJECTS) \
		-o libmatvec_asm.so.$(VERSION)
	cp x86_64/fast_vec.h ..
	cp libmatvec_asm.so.$(VERSION) ..

test: x86-64
	gcc -o asm_test x86_64/asm_test.c matvec_asm.o -I.. -L.. -lmatvec

.s.o:
	$(ASM) $(_ASM_FLAGS) $<

.c.o:
	$(CC) $(CPP_FLAGS) $(INCLUDE) $(C_FLAGS) $<

clean:
	rm -f *.h *.o
	rm -f asm_test
	rm -f *.so*